<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .aClass {
            color: red;
        }
        
        .bClass {
            color: #000;
            font-size: 40px;
        }
        
        .cClass {
            font-size: 40px;
        }
    </style>
</head>

<body>
    <div id="wzc">
        <h2>class绑定：class='XXX'</h2>
        <p class="cClass" :class="a">wzc</p>
        <p :class="{aClass:isA,bClass:isB}">wzc</p>
        <p :class="['aClass','cClass']">wzc</p>
        <h2>style绑定</h2>
        <p :style="{color:color,fontSize:fontSize+'px'}">wzcwzc</p>
        <button @click='up'>更新</button>
    </div>
    <script src="./vue.min.js"></script>
    <script>
        new Vue({
            el: '#wzc',
            data: {
                a: 'aClass',
                isA: true,
                isB: false,
                color: 'red',
                fontSize: 20
            },
            methods: {
                up() {
                    this.a = 'bClass';
                    this.isA = true;
                    this.isB = true;
                    this.color = 'blue';
                    this.fontSize = 40
                }
            },
        })
    </script>
</body>

</html>